// pages/skillwall/personal/personal.js
Page({
  data: {
    id: "",
    detail: {}
  },
  onLoad: function (options) {
    this.setData({
      id: options.id
    });
    this.getData();
  },
  getData() {
    getApp().globalData.http.detail({
      id: this.data.id
    }).then(res => {
      this.setData({
        detail: res.data
      });
    });
  },
  call() {
    wx.makePhoneCall({
      phoneNumber: this.data.detail.tel
    })
  },
  copy() {
    wx.setClipboardData({
      data: this.data.detail.wechat,
      success(res) {
        wx.getClipboardData({
          success(res) {
            getApp().globalData.vant.toast.success("复制成功");
          }
        })
      }
    });
  }
})